import Vue from 'vue'
// import VueRouter from 'vue-router'
import { createRouter, createWebHashHistory } from "vue-router";
import routeList from './modules'

// Vue.use(Router)

const routes = [{
    path: '/login',
    name: 'login',
    label: '登录',
    component: () => import('@/views/login'),
    children: []
}, {
    path: '/',
    name: '/',
    component: () => import('@/components/layout'),
    children: [...routeList]
}]

// const router = new Router({
//     mode: 'history',
//     scrollBehavior: () => ({ y: 0 }),
//     base: '/',
//     routes: pageRoutes.concat(moduleRoutes)
// })

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});
export default router
